﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WindowsFormsApp1
{
    public class RobotState
    {
        /// <summary>
        /// 机器人名
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 任务名
        /// </summary>
        public string MissionName { get; set; }

        /// <summary>
        /// 环境温度
        /// </summary>
        public double AmbientTemperature { get; set; }

        /// <summary>
        /// 环境湿度
        /// </summary>
        public double AmbientHumidity { get; set; }

        /// <summary>
        /// 本机温度
        /// </summary>
        public double ThisTemperature { get; set; }

        /// <summary>
        /// 气体1
        /// </summary>
        public double Gas1 { get; set; }

        /// <summary>
        /// 气体2
        /// </summary>
        public double Gas2 { get; set; }

        /// <summary>
        /// 气体3
        /// </summary>
        public double Gas3 { get; set; }

        /// <summary>
        /// 气体4
        /// </summary>
        public double Gas4 { get; set; }

        /// <summary>
        /// 气体5
        /// </summary>
        public double Gas5 { get; set; }

        /// <summary>
        /// 气体6
        /// </summary>
        public double Gas6 { get; set; }

        /// <summary>
        /// 气体7
        /// </summary>
        public double Gas7 { get; set; }

        /// <summary>
        /// 气体8
        /// </summary>
        public double Gas8 { get; set; }

        /// <summary>
        /// 位置
        /// </summary>
        public Pose2D Location { get; set; }

        /// <summary>
        /// 是否自动
        /// </summary>
        public bool AutoMode { get; set; }

        /// <summary>
        /// 工作状态
        /// </summary>
        public RobotWorkingState WorkingState { get; set; }

        /// <summary>
        /// 机器人速度
        /// </summary>
        public double RobotSpeed { get; set; }

        /// <summary>
        /// 电量
        /// </summary>
        public double ElectricityQuantity { get; set; }

        /// <summary>
        /// 充电电压
        /// </summary>
        public double ChargingVoltage { get; set; }

        /// <summary>
        /// 充电电流
        /// </summary>
        public double ChargingCurrent { get; set; }

        /// <summary>
        /// 磁场强度
        /// </summary>
        public double MagneticFieldIntensity { get; set; }

        /// <summary>
        /// 返回的充电机充电标志
        /// </summary>
        public int BatteryChargerIsCharge { get; set; }

        /// <summary>
        /// 充电机故障码
        /// </summary>
        public int BatteryChargerErrorCode { get; set; }

        /// <summary>
        /// 返回的电池充电标志
        /// </summary>
        public int BatteryIsCharge { get; set; }

        /// <summary>
        /// 导航仪定位置信度
        /// </summary>
        public int NavTrust { get; set; }

        /// <summary>
        /// 导航仪当前导航状态
        /// </summary>
        public int NavCurrentState { get; set; }

        /// <summary>
        /// 导航仪错误码
        /// </summary>
        public int NavigatorErrorCode { get; set; }

        /// <summary>
        /// 导航仪状态码
        /// </summary>
        public int NavigatorStateCode { get; set; }

        /// <summary>
        /// 机械臂/云台状态码
        /// </summary>
        public int OtherStateCode { get; set; }

        /// <summary>
        /// 机械臂/云台故障码
        /// </summary>
        public int OtherFaultCode { get; set; }
        /// <summary>
        /// 机械臂或者云台的各轴位置
        /// </summary>
        public double ArmJ1 { get; set; }
        public double ArmJ2 { get; set; }
        public double ArmJ3 { get; set; }
        public double ArmJ4 { get; set; }
        public double ArmJ5 { get; set; }
        public double ArmJ6 { get; set; }
        public double ArmX { get; set; }
        public double ArmY { get; set; }
        public double ArmZ { get; set; }
        public double ArmRX { get; set; }
        public double ArmRY { get; set; }
        public double ArmRZ { get; set; }


    }

    public struct Pose2D
    {
        public double X, Y, A;
        public Pose2D(double x, double y, double a)
        {
            X = x; Y = y; A = a;
        }
    }

    public enum RobotWorkingState
    {
        空闲中 = 0,
        导航中,
        充电中,
        等待中,
        离线
    }
}
